package com.dalei.vdsmanager.management.vds.action;

import java.util.List;

import com.dalei.vdsmanager.management.vds.dao.VDSUser;
import com.dalei.vdsmanager.management.vds.service.VDSUserService;
import com.opensymphony.xwork2.ActionSupport;

public class ListVDSUserAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1967771770805998707L;

	private VDSUserService vdsUserService;

	private List<VDSUser> vdsUsers;

	public VDSUserService getVdsUserService() {
		return vdsUserService;
	}

	public void setVdsUserService(VDSUserService vdsUserService) {
		this.vdsUserService = vdsUserService;
	}

	public List<VDSUser> getVdsUsers() {
		return vdsUsers;
	}

	public void setVdsUsers(List<VDSUser> vdsUsers) {
		this.vdsUsers = vdsUsers;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		// return super.execute();
		vdsUsers = vdsUserService.getVDSUserList();
		if (vdsUsers != null) {
			return SUCCESS;
		} else {
			return ERROR;
		}
	}
}
